package org.micropayment.model.data;

import java.util.ArrayList;
import java.util.List;
import org.micropayment.model.MicropaymentConsumer;
import org.micropayment.model.MicropaymentUser;
import org.micropayment.model.SignatureMethod;
import org.micropayment.model.TypeOfSecret;

/**
 *
 * @author jj
 */
public class ConsumerData {
    //TODO. improve this!!!
    //Class for populating DB for first use with prototype.

    public static List<MicropaymentConsumer> getConsumerData (
            List<MicropaymentUser> users) {
        ArrayList<MicropaymentConsumer> listaConsumers =
                new ArrayList<MicropaymentConsumer>();
        MicropaymentConsumer consumer1 = new MicropaymentConsumer (null,
                "bookstore1-consumer-key", "secret1",
                TypeOfSecret.SharedConsumerSecret, "bookstore1");
        consumer1.setMicrocreditUserId(users.get(0));
        consumer1.setSignatureMethod(SignatureMethod.HMAC_SHA1);
        consumer1.setConsumerName("bookstore1");
        MicropaymentConsumer consumer2 = new MicropaymentConsumer (null,
                "professionalServices1-consumer-key", "secret2",
                TypeOfSecret.SharedConsumerSecret, "professionalServices1");
        consumer2.setMicrocreditUserId(users.get(1));
        consumer2.setSignatureMethod(SignatureMethod.HMAC_SHA1);
        consumer2.setConsumerName("professionalServices1");
        listaConsumers.add(consumer1);
        listaConsumers.add(consumer2);
        return listaConsumers;
    }

}
